\hypertarget{group__nxbot__eeprom}{
\section{EEPROM Library}
\label{group__nxbot__eeprom}\index{EEPROM Library@{EEPROM Library}}
}


Eeprom library for saving long-\/term variables of NXBOT.  


\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__nxbot__eeprom_ga9e06881d5dba85a30b23b57d6ce5d830}{PID\_\-TI}~0
\begin{DoxyCompactList}\small\item\em Constant for saving TI parameter in EEPROM. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__eeprom_ga59ca45566e64a460241c8c2bad4c6c73}{PID\_\-TD}~1
\begin{DoxyCompactList}\small\item\em Constant for saving TD parameter in EEPROM. \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__eeprom_ga6b207f9033329febafe1690def5a0dc9}{PID\_\-KP}~2
\begin{DoxyCompactList}\small\item\em Constant for saving KP parameter in EEPROM. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__nxbot__eeprom_ga4ec7f9d780da432051aa74ec5892a94c}{eeprom\_\-init} (void)
\begin{DoxyCompactList}\small\item\em Hardware initialization for the eeprom module. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__eeprom_gafcb12ce0175b31eee1eabb3645d2fdeb}{eeprom\_\-writePIDParam} (unsigned char PIDparam, float value)
\begin{DoxyCompactList}\small\item\em Function used to write any of the three parameters of the PID velocity controller: TI, TD and KP. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__eeprom_gaa5b09aeec4ee15f4543308ae5b0a5ab8}{eeprom\_\-writeSonarCount} (unsigned char sonarCount)
\begin{DoxyCompactList}\small\item\em Function used to save the number of sonars used by NXBOT. \item\end{DoxyCompactList}\item 
float \hyperlink{group__nxbot__eeprom_gacb9f4ad383ec3780e5aa9b27ba227cff}{eeprom\_\-readPIDParam} (unsigned char PIDparam)
\item 
unsigned char \hyperlink{group__nxbot__eeprom_gafaf95a222201027388cbbe926e772024}{eeprom\_\-readSonarCount} (void)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Eeprom library for saving long-\/term variables of NXBOT. 
\begin{DoxyCode}
 #include <eeprom.h> 
\end{DoxyCode}
 This module uses the on-\/chip eeprom memory of the ATmega1281 microcontroller. It is used to store configuration parameters, such as the PID values for the velocity loop, the number of sonars being conected to NXBOT, among others. 

\subsection{Define Documentation}
\hypertarget{group__nxbot__eeprom_ga6b207f9033329febafe1690def5a0dc9}{
\index{nxbot\_\-eeprom@{nxbot\_\-eeprom}!PID\_\-KP@{PID\_\-KP}}
\index{PID\_\-KP@{PID\_\-KP}!nxbot_eeprom@{nxbot\_\-eeprom}}
\subsubsection[{PID\_\-KP}]{\setlength{\rightskip}{0pt plus 5cm}\#define PID\_\-KP~2}}
\label{group__nxbot__eeprom_ga6b207f9033329febafe1690def5a0dc9}


Constant for saving KP parameter in EEPROM. 

\begin{DoxySeeAlso}{See also}
\hyperlink{group__nxbot__eeprom_gafcb12ce0175b31eee1eabb3645d2fdeb}{eeprom\_\-writePIDParam} 
\end{DoxySeeAlso}
\hypertarget{group__nxbot__eeprom_ga59ca45566e64a460241c8c2bad4c6c73}{
\index{nxbot\_\-eeprom@{nxbot\_\-eeprom}!PID\_\-TD@{PID\_\-TD}}
\index{PID\_\-TD@{PID\_\-TD}!nxbot_eeprom@{nxbot\_\-eeprom}}
\subsubsection[{PID\_\-TD}]{\setlength{\rightskip}{0pt plus 5cm}\#define PID\_\-TD~1}}
\label{group__nxbot__eeprom_ga59ca45566e64a460241c8c2bad4c6c73}


Constant for saving TD parameter in EEPROM. 

\begin{DoxySeeAlso}{See also}
\hyperlink{group__nxbot__eeprom_gafcb12ce0175b31eee1eabb3645d2fdeb}{eeprom\_\-writePIDParam} 
\end{DoxySeeAlso}
\hypertarget{group__nxbot__eeprom_ga9e06881d5dba85a30b23b57d6ce5d830}{
\index{nxbot\_\-eeprom@{nxbot\_\-eeprom}!PID\_\-TI@{PID\_\-TI}}
\index{PID\_\-TI@{PID\_\-TI}!nxbot_eeprom@{nxbot\_\-eeprom}}
\subsubsection[{PID\_\-TI}]{\setlength{\rightskip}{0pt plus 5cm}\#define PID\_\-TI~0}}
\label{group__nxbot__eeprom_ga9e06881d5dba85a30b23b57d6ce5d830}


Constant for saving TI parameter in EEPROM. 

\begin{DoxySeeAlso}{See also}
\hyperlink{group__nxbot__eeprom_gafcb12ce0175b31eee1eabb3645d2fdeb}{eeprom\_\-writePIDParam} 
\end{DoxySeeAlso}


\subsection{Function Documentation}
\hypertarget{group__nxbot__eeprom_ga4ec7f9d780da432051aa74ec5892a94c}{
\index{nxbot\_\-eeprom@{nxbot\_\-eeprom}!eeprom\_\-init@{eeprom\_\-init}}
\index{eeprom\_\-init@{eeprom\_\-init}!nxbot_eeprom@{nxbot\_\-eeprom}}
\subsubsection[{eeprom\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void eeprom\_\-init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{group__nxbot__eeprom_ga4ec7f9d780da432051aa74ec5892a94c}


Hardware initialization for the eeprom module. 

ffgadgfdsds. \hypertarget{group__nxbot__eeprom_gacb9f4ad383ec3780e5aa9b27ba227cff}{
\index{nxbot\_\-eeprom@{nxbot\_\-eeprom}!eeprom\_\-readPIDParam@{eeprom\_\-readPIDParam}}
\index{eeprom\_\-readPIDParam@{eeprom\_\-readPIDParam}!nxbot_eeprom@{nxbot\_\-eeprom}}
\subsubsection[{eeprom\_\-readPIDParam}]{\setlength{\rightskip}{0pt plus 5cm}float eeprom\_\-readPIDParam (
\begin{DoxyParamCaption}
\item[{unsigned char}]{PIDparam}
\end{DoxyParamCaption}
)}}
\label{group__nxbot__eeprom_gacb9f4ad383ec3780e5aa9b27ba227cff}

\begin{DoxyParams}{Parameters}
{\em PIDparam} & \\
\hline
\end{DoxyParams}
\hypertarget{group__nxbot__eeprom_gafaf95a222201027388cbbe926e772024}{
\index{nxbot\_\-eeprom@{nxbot\_\-eeprom}!eeprom\_\-readSonarCount@{eeprom\_\-readSonarCount}}
\index{eeprom\_\-readSonarCount@{eeprom\_\-readSonarCount}!nxbot_eeprom@{nxbot\_\-eeprom}}
\subsubsection[{eeprom\_\-readSonarCount}]{\setlength{\rightskip}{0pt plus 5cm}unsigned char eeprom\_\-readSonarCount (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{group__nxbot__eeprom_gafaf95a222201027388cbbe926e772024}
\hypertarget{group__nxbot__eeprom_gafcb12ce0175b31eee1eabb3645d2fdeb}{
\index{nxbot\_\-eeprom@{nxbot\_\-eeprom}!eeprom\_\-writePIDParam@{eeprom\_\-writePIDParam}}
\index{eeprom\_\-writePIDParam@{eeprom\_\-writePIDParam}!nxbot_eeprom@{nxbot\_\-eeprom}}
\subsubsection[{eeprom\_\-writePIDParam}]{\setlength{\rightskip}{0pt plus 5cm}void eeprom\_\-writePIDParam (
\begin{DoxyParamCaption}
\item[{unsigned char}]{PIDparam, }
\item[{float}]{value}
\end{DoxyParamCaption}
)}}
\label{group__nxbot__eeprom_gafcb12ce0175b31eee1eabb3645d2fdeb}


Function used to write any of the three parameters of the PID velocity controller: TI, TD and KP. 

Use one of the following constants to save the value of each parameter: PID\_\-TI, PID\_\-TD, PID\_\-KP.


\begin{DoxyParams}{Parameters}
{\em PIDparam} & One of three values:
\begin{DoxyItemize}
\item {\bfseries PID\_\-TI} \par
 The value of the Integration module of the controller.
\item {\bfseries PID\_\-TD} \par
 The value of the Derivative module of the controller.
\item {\bfseries PID\_\-KP} \par
 The value of the Proportional module of the controller.
\end{DoxyItemize}\\
\hline
{\em value} & The floating value of the selected parameter. \\
\hline
\end{DoxyParams}
\hypertarget{group__nxbot__eeprom_gaa5b09aeec4ee15f4543308ae5b0a5ab8}{
\index{nxbot\_\-eeprom@{nxbot\_\-eeprom}!eeprom\_\-writeSonarCount@{eeprom\_\-writeSonarCount}}
\index{eeprom\_\-writeSonarCount@{eeprom\_\-writeSonarCount}!nxbot_eeprom@{nxbot\_\-eeprom}}
\subsubsection[{eeprom\_\-writeSonarCount}]{\setlength{\rightskip}{0pt plus 5cm}void eeprom\_\-writeSonarCount (
\begin{DoxyParamCaption}
\item[{unsigned char}]{sonarCount}
\end{DoxyParamCaption}
)}}
\label{group__nxbot__eeprom_gaa5b09aeec4ee15f4543308ae5b0a5ab8}


Function used to save the number of sonars used by NXBOT. 


\begin{DoxyParams}{Parameters}
{\em sonarCount} & The number of sonars. \\
\hline
\end{DoxyParams}
